\(\int \frac {(a+b \log (c x^n))^2}{\sqrt {d x}} \, dx\) [98]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 20, antiderivative size = 67 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{\sqrt {d x}} \, dx=\frac {16 b^2 n^2 \sqrt {d x}}{d}-\frac {8 b n \sqrt {d x} \left (a+b \log \left (c x^n\right )\right )}{d}+\frac {2 \sqrt {d x} \left (a+b \log \left (c x^n\right )\right )^2}{d} \]

[Out]

16*b^2*n^2*(d*x)^(1/2)/d-8*b*n*(a+b*ln(c*x^n))*(d*x)^(1/2)/d+2*(a+b*ln(c*x^n))^2*(d*x)^(1/2)/d

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {2342, 2341} \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{\sqrt {d x}} \, dx=-\frac {8 b n \sqrt {d x} \left (a+b \log \left (c x^n\right )\right )}{d}+\frac {2 \sqrt {d x} \left (a+b \log \left (c x^n\right )\right )^2}{d}+\frac {16 b^2 n^2 \sqrt {d x}}{d} \]

[In]

Int[(a + b*Log[c*x^n])^2/Sqrt[d*x],x]

[Out]

(16*b^2*n^2*Sqrt[d*x])/d - (8*b*n*Sqrt[d*x]*(a + b*Log[c*x^n]))/d + (2*Sqrt[d*x]*(a + b*Log[c*x^n])^2)/d

Rule 2341

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^
n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^(m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2342

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Lo
g[c*x^n])^p/(d*(m + 1))), x] - Dist[b*n*(p/(m + 1)), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {2 \sqrt {d x} \left (a+b \log \left (c x^n\right )\right )^2}{d}-(4 b n) \int \frac {a+b \log \left (c x^n\right )}{\sqrt {d x}} \, dx \\ & = \frac {16 b^2 n^2 \sqrt {d x}}{d}-\frac {8 b n \sqrt {d x} \left (a+b \log \left (c x^n\right )\right )}{d}+\frac {2 \sqrt {d x} \left (a+b \log \left (c x^n\right )\right )^2}{d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.81 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{\sqrt {d x}} \, dx=\frac {2 x \left (a^2-4 a b n+8 b^2 n^2+2 b (a-2 b n) \log \left (c x^n\right )+b^2 \log ^2\left (c x^n\right )\right )}{\sqrt {d x}} \]

[In]

Integrate[(a + b*Log[c*x^n])^2/Sqrt[d*x],x]

[Out]

(2*x*(a^2 - 4*a*b*n + 8*b^2*n^2 + 2*b*(a - 2*b*n)*Log[c*x^n] + b^2*Log[c*x^n]^2))/Sqrt[d*x]

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.37

method result size
derivativedivides \(\frac {2 \sqrt {d x}\, a^{2}+2 b^{2} \sqrt {d x}\, \ln \left (c \,{\mathrm e}^{n \ln \left (x \right )}\right )^{2}+16 b^{2} n^{2} \sqrt {d x}-8 b^{2} n \sqrt {d x}\, \ln \left (c \,{\mathrm e}^{n \ln \left (x \right )}\right )+4 \sqrt {d x}\, a b \ln \left (c \,x^{n}\right )-8 a b n \sqrt {d x}}{d}\) \(92\)
default \(\frac {2 \sqrt {d x}\, a^{2}+2 b^{2} \sqrt {d x}\, \ln \left (c \,{\mathrm e}^{n \ln \left (x \right )}\right )^{2}+16 b^{2} n^{2} \sqrt {d x}-8 b^{2} n \sqrt {d x}\, \ln \left (c \,{\mathrm e}^{n \ln \left (x \right )}\right )+4 \sqrt {d x}\, a b \ln \left (c \,x^{n}\right )-8 a b n \sqrt {d x}}{d}\) \(92\)
risch \(\frac {2 b^{2} x \ln \left (x^{n}\right )^{2}}{\sqrt {d x}}+\frac {2 b \left (-i b \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )+i b \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+2 b \ln \left (c \right )-4 b n +2 a \right ) x \ln \left (x^{n}\right )}{\sqrt {d x}}+\frac {\left (4 a^{2}+8 i \pi \,b^{2} n \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+2 \pi ^{2} b^{2} \operatorname {csgn}\left (i c \right )^{2} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{3}-4 i \ln \left (c \right ) \pi \,b^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{3}-4 i \pi a b \operatorname {csgn}\left (i c \,x^{n}\right )^{3}-\pi ^{2} b^{2} \operatorname {csgn}\left (i c \right )^{2} \operatorname {csgn}\left (i x^{n}\right )^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+8 i \pi \,b^{2} n \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )-4 i \ln \left (c \right ) \pi \,b^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )-4 i \pi a b \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )+2 \pi ^{2} b^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right )^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{3}-4 \pi ^{2} b^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{4}+2 \pi ^{2} b^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{5}-\pi ^{2} b^{2} \operatorname {csgn}\left (i x^{n}\right )^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{4}+2 \pi ^{2} b^{2} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{5}-\pi ^{2} b^{2} \operatorname {csgn}\left (i c \right )^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{4}+32 b^{2} n^{2}+8 \ln \left (c \right ) a b +4 \ln \left (c \right )^{2} b^{2}-16 b^{2} \ln \left (c \right ) n -16 a b n -\pi ^{2} b^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{6}+4 i \pi a b \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+4 i \pi a b \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-8 i \pi \,b^{2} n \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+4 i \ln \left (c \right ) \pi \,b^{2} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-8 i \pi \,b^{2} n \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+4 i \ln \left (c \right ) \pi \,b^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}\right ) x}{2 \sqrt {d x}}\) \(701\)

[In]

int((a+b*ln(c*x^n))^2/(d*x)^(1/2),x,method=_RETURNVERBOSE)

[Out]

2/d*((d*x)^(1/2)*a^2+b^2*(d*x)^(1/2)*ln(c*exp(n*ln(x)))^2+8*b^2*n^2*(d*x)^(1/2)-4*b^2*n*(d*x)^(1/2)*ln(c*exp(n
*ln(x)))+2*(d*x)^(1/2)*a*b*ln(c*x^n)-4*a*b*n*(d*x)^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.30 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{\sqrt {d x}} \, dx=\frac {2 \, {\left (b^{2} n^{2} \log \left (x\right )^{2} + 8 \, b^{2} n^{2} + b^{2} \log \left (c\right )^{2} - 4 \, a b n + a^{2} - 2 \, {\left (2 \, b^{2} n - a b\right )} \log \left (c\right ) - 2 \, {\left (2 \, b^{2} n^{2} - b^{2} n \log \left (c\right ) - a b n\right )} \log \left (x\right )\right )} \sqrt {d x}}{d} \]

[In]

integrate((a+b*log(c*x^n))^2/(d*x)^(1/2),x, algorithm="fricas")

[Out]

2*(b^2*n^2*log(x)^2 + 8*b^2*n^2 + b^2*log(c)^2 - 4*a*b*n + a^2 - 2*(2*b^2*n - a*b)*log(c) - 2*(2*b^2*n^2 - b^2
*n*log(c) - a*b*n)*log(x))*sqrt(d*x)/d

Sympy [A] (verification not implemented)

Time = 0.33 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.63 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{\sqrt {d x}} \, dx=\frac {2 a^{2} x}{\sqrt {d x}} - \frac {8 a b n x}{\sqrt {d x}} + \frac {4 a b x \log {\left (c x^{n} \right )}}{\sqrt {d x}} + \frac {16 b^{2} n^{2} x}{\sqrt {d x}} - \frac {8 b^{2} n x \log {\left (c x^{n} \right )}}{\sqrt {d x}} + \frac {2 b^{2} x \log {\left (c x^{n} \right )}^{2}}{\sqrt {d x}} \]

[In]

integrate((a+b*ln(c*x**n))**2/(d*x)**(1/2),x)

[Out]

2*a**2*x/sqrt(d*x) - 8*a*b*n*x/sqrt(d*x) + 4*a*b*x*log(c*x**n)/sqrt(d*x) + 16*b**2*n**2*x/sqrt(d*x) - 8*b**2*n
*x*log(c*x**n)/sqrt(d*x) + 2*b**2*x*log(c*x**n)**2/sqrt(d*x)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.52 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{\sqrt {d x}} \, dx=\frac {2 \, \sqrt {d x} b^{2} \log \left (c x^{n}\right )^{2}}{d} + 8 \, {\left (\frac {2 \, \sqrt {d x} n^{2}}{d} - \frac {\sqrt {d x} n \log \left (c x^{n}\right )}{d}\right )} b^{2} - \frac {8 \, \sqrt {d x} a b n}{d} + \frac {4 \, \sqrt {d x} a b \log \left (c x^{n}\right )}{d} + \frac {2 \, \sqrt {d x} a^{2}}{d} \]

[In]

integrate((a+b*log(c*x^n))^2/(d*x)^(1/2),x, algorithm="maxima")

[Out]

2*sqrt(d*x)*b^2*log(c*x^n)^2/d + 8*(2*sqrt(d*x)*n^2/d - sqrt(d*x)*n*log(c*x^n)/d)*b^2 - 8*sqrt(d*x)*a*b*n/d +
4*sqrt(d*x)*a*b*log(c*x^n)/d + 2*sqrt(d*x)*a^2/d

Giac [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.76 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{\sqrt {d x}} \, dx=\frac {2 \, {\left ({\left (\sqrt {d x} \log \left (x\right )^{2} - 4 \, \sqrt {d x} \log \left (x\right ) + 8 \, \sqrt {d x}\right )} b^{2} n^{2} + 2 \, {\left (\sqrt {d x} \log \left (x\right ) - 2 \, \sqrt {d x}\right )} b^{2} n \log \left (c\right ) + \sqrt {d x} b^{2} \log \left (c\right )^{2} + 2 \, {\left (\sqrt {d x} \log \left (x\right ) - 2 \, \sqrt {d x}\right )} a b n + 2 \, \sqrt {d x} a b \log \left (c\right ) + \sqrt {d x} a^{2}\right )}}{d} \]

[In]

integrate((a+b*log(c*x^n))^2/(d*x)^(1/2),x, algorithm="giac")

[Out]

2*((sqrt(d*x)*log(x)^2 - 4*sqrt(d*x)*log(x) + 8*sqrt(d*x))*b^2*n^2 + 2*(sqrt(d*x)*log(x) - 2*sqrt(d*x))*b^2*n*
log(c) + sqrt(d*x)*b^2*log(c)^2 + 2*(sqrt(d*x)*log(x) - 2*sqrt(d*x))*a*b*n + 2*sqrt(d*x)*a*b*log(c) + sqrt(d*x
)*a^2)/d

Mupad [F(-1)]

Timed out. \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{\sqrt {d x}} \, dx=\int \frac {{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2}{\sqrt {d\,x}} \,d x \]

[In]

int((a + b*log(c*x^n))^2/(d*x)^(1/2),x)

[Out]

int((a + b*log(c*x^n))^2/(d*x)^(1/2), x)